package com.ruoyi.web.controller.crm;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.redis.RedisKey;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.BsArea;
import com.ruoyi.system.service.IBsAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 地区设置Controller
 * 
 * @author ruoyi
 * @date 2020-11-05
 */
@RestController
@RequestMapping("/system/cache")
public class SysCacheController extends BaseController
{
    @Autowired
    private RedisCache redisCache;

    /**
     * 查询地区设置列表
     */
    @GetMapping("/deleteCache")
    public AjaxResult deleteCache()
    {   //清除城市缓存
        redisCache.deleteObject(RedisKey.GEO_SYSTEM_CITY);
        //清除行业
        redisCache.deleteObject(RedisKey.GEO_SYSTEM_INDUSTRY);
        redisCache.deleteObject(RedisKey.GEO_SYSTEM_CRMUSER);
        redisCache.deleteObject(RedisKey.GEO_SYSTEM_GROUP);
        return AjaxResult.success("清除成功");
    }

}
